// 门卡管理
import {
    ajaxPostBack, ajaxPost
} from '@/utils/data/request'

// 列表
export function list(params: any) {
    return ajaxPostBack("device/scrip-all-list", params, {
        cookies: ['yard_sn']
    })
}

// 开住户卡
export function user(params: any) {
    return ajaxPost("device/scrip-holder-create", params, {
        cookies: ['yard_sn'], successMessage: true
    })
}

// 开管理卡
export function manage(params: any) {
    return ajaxPost("device/scrip-staff-create", params, {
        cookies: ['yard_sn'], successMessage: true
    })
}

// 授权的门禁列表
export function scripAuthDoorList(params: any) {
    return ajaxPost("device/scrip-door-list", params, {
        cookies: ['yard_sn']
    })
}

// 凭证未关联的门禁列表
export function scripDoorAddedList(params: any) {
    return ajaxPostBack("device/scrip-door-added-list", params, { cookies: ['yard_sn'] })
}
// 添加授权门禁
export function scripAuthDoorAdd(params: any) {
    return ajaxPost("device/scrip-door-add", params, {
        cookies: ['yard_sn'], successMessage: true
    })
}

// 删除授权门禁
export function scripAuthDoorDelete(params: any) {
    return ajaxPost("device/scrip-door-delete", params, {
        cookies: ['yard_sn'], successMessage: true
    })
}
